package cn.itsource.org.controller;

import cn.itsource.org.domain.Employee;
import cn.itsource.org.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/emp")
public class EmpController {
    @Autowired
    private IDepartmentService service;

     @GetMapping("/findele")
    public List<Employee> gettree(){
         return  service.findtree();
     }
}